!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define("EasyPieChart",["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size,a.appendChild(d);var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c,d=24;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)0===d%6?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate),g=b.easing(this,f,a,c-a,b.animate);this.draw(g),b.onStep(a,c,g),f>=b.animate?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:1e3,easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}}); (function($){ $.fn.appear=function(fn, options){ var settings=$.extend({ data: undefined, one: true, accX: 0, accY: 0 }, options); return this.each(function(){ var t=$(this); t.appeared=false; if(!fn){ t.trigger('appear', settings.data); return; } var w=$(window); var check=function(){ if(!t.is(':visible')){ t.appeared=false; return; } var a=w.scrollLeft(); var b=w.scrollTop(); var o=t.offset(); var x=o.left; var y=o.top; var ax=settings.accX; var ay=settings.accY; var th=t.height(); var wh=w.height(); var tw=t.width(); var ww=w.width(); if(y + th + ay >=b && y <=b + wh + ay && x + tw + ax >=a && x <=a + ww + ax){ if(!t.appeared) t.trigger('appear', settings.data); }else{ t.appeared=false; }}; var modifiedFn=function(){ t.appeared=true; if(settings.one){ w.unbind('scroll', check); var i=$.inArray(check, $.fn.appear.checks); if(i >=0) $.fn.appear.checks.splice(i, 1); } fn.apply(this, arguments); }; if(settings.one) t.one('appear', settings.data, modifiedFn); else t.bind('appear', settings.data, modifiedFn); w.scroll(check); $.fn.appear.checks.push(check); (check)(); }); }; $.extend($.fn.appear, { checks: [], timeout: null, checkAll: function(){ var length=$.fn.appear.checks.length; if(length > 0) while (length--) ($.fn.appear.checks[length])(); }, run: function(){ if($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); $.fn.appear.timeout=setTimeout($.fn.appear.checkAll, 20); }}); $.each(['append', 'prepend', 'after', 'before', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'remove', 'css', 'show', 'hide'], function(i, n){ var old=$.fn[n]; if(old){ $.fn[n]=function(){ var r=old.apply(this, arguments); $.fn.appear.run(); return r; }} }); })(jQuery); jQuery(document).ready(function($){ var smoothScroll = !!('WebkitOverflowScrolling' in document.documentElement.style); var touchDevice=(Modernizr.touch) ? true:false; var css3=(Modernizr.csstransforms3d) ? true:false; var pre; function prefix(){ var styles=window.getComputedStyle(document.documentElement, ''); pre=(Array.prototype.slice.call(styles).join('') .match(/-(moz|webkit|ms)-/)||(styles.OLink===''&&['', 'o']))[1]; } if(css3===true){ prefix(); } var ie=(function(){ var v=3, div=document.createElement('div'), all=div.getElementsByTagName('i'); do { div.innerHTML=''; } while (all[0]); return v > 4 ? v:document.documentMode; }()); var scroll=window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function(callback){ window.setTimeout(callback, 1000/600); }; $('.paratrue iframe').each(function(){ if(ie==11&&parseInt($(this).parent().height()) > 1000){ $(this).closest('.parallax-container').removeClass('paratrue'); }}); var divPosition=-1; function parallaxImgDiv(){ if(divPosition==$(document).scrollTop()){ scroll(parallaxImgDiv); return false; }else{ if(touchDevice===false&&css3===true){ var wH=$(window).height(); $('.paratrue').each(function(){ var $this=$(this); var sPos=$(document).scrollTop(); var pPos=$this.offset().top; var pH=$this.outerHeight(true); var pTop=pPos - wH; var pBot=pPos + wH; if(sPos >=pTop&&sPos <=pBot){ var pF=50/(wH+pH); var pX=Math.abs(sPos-pTop)*pF*-1; $this.find('.parallax-container-inner').css('-'+pre+'-transform', 'translate3d(0px, '+pX+'%, 0px)'); }}); }} scroll(parallaxImgDiv); } if(touchDevice===false){ parallaxImgDiv(); } $.fn.countTo=function(options){ options=$.extend({}, $.fn.countTo.defaults, options||{}); var loops=Math.ceil(options.speed / options.refreshInterval), increment=(options.to - options.from) / loops; return $(this).each(function(){ var _this=this, loopCount=0, value=options.from, interval=setInterval(updateTimer, options.refreshInterval); function updateTimer(){ value +=increment; loopCount++; $(_this).html(value.toFixed(options.decimals)+options.sign); if(typeof(options.onUpdate)=='function'){ options.onUpdate.call(_this, value); } if(loopCount >=loops){ clearInterval(interval); value=options.to; if(typeof(options.onComplete)=='function'){ options.onComplete.call(_this, value); }} }}); }; $.fn.countTo.defaults={ from: 0, to: 100, speed: 1000, refreshInterval: 100, decimals: 0, sign: '', onUpdate: null, onComplete: null }; function colCalc(){ $('.col.col-3').each(function(){ var $currentDiv=$(this); var $nextDiv=$(this).next('div, li'); if($nextDiv.hasClass('col-3')&&!$currentDiv.hasClass('col1-4')){ $currentDiv.addClass('col1-4 clear-both'); $nextDiv.addClass('col1-4 right-edge'); }}); $('.col.col-2').each(function(){ var $currentDiv=$(this); var $nextDiv=$currentDiv.nextAll('div, li').slice(0,6); if($nextDiv.hasClass('col-2')&&!$currentDiv.hasClass('col1-4')){ $currentDiv.addClass('col1-4 clear-both'); $currentDiv.nextAll('div, li').slice(0,1).addClass('col1-4 right-edge'); $currentDiv.nextAll('div, li').slice(1,2).addClass('col1-4 clear-both mid-edge'); $currentDiv.nextAll('div, li').slice(2,3).addClass('col1-4 col1-6 right-edge'); $currentDiv.nextAll('div, li').slice(3,4).addClass('col1-4 clear-both'); $currentDiv.nextAll('div, li').slice(4,5).addClass('col1-4 right-edge'); }}); } function viewport(){ var e=window, a='inner'; if(!('innerWidth' in window)){ a='client'; e=document.documentElement||document.body; } return { width:e[ a+'Width' ]};} function colCalc2(){ windowSize=viewport().width; var colHP=[]; var colNb=1; $('.to-anim-box').each(function(){ var height=[]; var $currentDiv=$(this); $currentDiv.add($currentDiv.find('.to-anim-box-icon-inner,.to-anim-box-desc,.to-anim-box-icon')).addClass('notransition').height('auto'); height.push($currentDiv.find('.to-anim-box-desc').outerHeight()); height.push($currentDiv.find('.to-anim-box-icon').outerHeight()); height=Math.max.apply(Math,height); $currentDiv.add($currentDiv.find('.to-anim-box-icon-inner,.to-anim-box-desc,.to-anim-box-icon')).css('height',height+'px'); $currentDiv.add($currentDiv.find('.to-anim-box-icon-inner,.to-anim-box-desc,.to-anim-box-icon')).removeClass('notransition'); }); $('.col.col-padding').each(function(){ var $currentDiv=$(this); $currentDiv.height('auto'); if($currentDiv.find('.to-anim-box').length){ $currentDiv.addClass('to-anim-box-border'); } if($currentDiv.find('.to-member-box').length){ var img=$currentDiv.find('.team-member-box-image').css('background-image').replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); var tmpImg=new Image(); tmpImg.src=img; $(tmpImg).on('load',function(){ var ratio=tmpImg.height/tmpImg.width; var height=$currentDiv.outerWidth()*ratio; $currentDiv.css('height',height); }); } if(windowSize > 999&&!$currentDiv.children('.to-step').length){ var $nextDiv=$currentDiv.next('div'); $currentDiv.addClass('col-H'+colNb); colHP.push($currentDiv.outerHeight()); if($currentDiv.hasClass('col-last')){ var height=Math.max.apply(Math,colHP); $('.col-H'+colNb).css('height',height+'px'); colHP=[]; colNb++; }} }); $('.equal-height').each(function(){ var $currentDiv=$(this).find('> [class*=vc_col-], > .section-container > [class*=vc_col-]'); $currentDiv.last().addClass('col-last'); $currentDiv.height('auto'); $currentDiv.each(function(){ $currentDiv=$(this); if($currentDiv.find('.to-anim-box').length){ $currentDiv.addClass('to-anim-box-border'); } if($currentDiv.find('.to-member-box').length){ $currentDiv.addClass('col-H'+colNb); var img=$currentDiv.find('.team-member-box-image').css('background-image').replace(/^url\(["']?/, '').replace(/["']?\)$/, ''); var tmpImg=new Image(); tmpImg.src=img; $(tmpImg).on('load',function(){ var ratio=tmpImg.height/tmpImg.width; var height=$currentDiv.outerWidth()*ratio; colHP.push(height); if($currentDiv.hasClass('col-last')){ var height=Math.max.apply(Math,colHP); $('.col-H'+colNb).css('height',height+'px'); colHP=[]; colNb++; }}); }else if(!$currentDiv.children('.to-step').length){ var $nextDiv=$currentDiv.next('div'); $currentDiv.addClass('col-H'+colNb); colHP.push($currentDiv.outerHeight()); if($currentDiv.hasClass('col-last')){ var height=Math.max.apply(Math,colHP); $('.col-H'+colNb).css('height',height+'px'); colHP=[]; colNb++; }} }); }); } $(window).resize(function(){ setTimeout(function(){ colCalc2(); },800); }); function colAnim(){ $('.no-touch.no-csstransitions .has-anim').appear(function(){ var $this=$(this); anim=$this.attr('data-anim').replace('from-', ''); delay=$this.attr('data-delay'); ease='easeOutSine'; options={}; options[anim]=0; options['opacity']=1; if(anim!==''&&anim!=='grow-in'&&anim!=='flip-in'){ $this.delay(delay).animate(options, 800, ease); } setTimeout(function(){ $this.removeClass('has-anim'); },parseInt(delay)+1200); },{accX: 0, accY: -90}); $('.no-touch.csstransitions .has-anim').appear(function(){ var $this=$(this); delay=$this.attr('data-delay'); setTimeout(function(){ $this.css({ 'transform': 'perspective(1000px) rotateY(0deg) translate3d(0,0,0)', '-webkit-transform': 'perspective(1000px) rotateY(0deg) translate3d(0,0,0)', '-o-transform': 'perspective(1000px) rotateY(0deg) translate3d(0,0,0)', '-moz-transform': 'perspective(1000px) rotateY(0deg) translate3d(0,0,0)', 'opacity': 1 }); },delay); setTimeout(function(){ $this.removeClass('has-anim'); },parseInt(delay)+1200); },{accX: 0, accY: -90}); } $(window).resize(function(){ $('.no-touch .has-anim .owl-carousel').each(function(){ $this=$(this); $this.closest('.has-anim').addClass('notransition'); }); setTimeout(function(){ $('.no-touch .has-anim .owl-carousel').closest('.has-anim').removeClass('notransition'); }, 300); }); function progressBar(){ $('.to-progress-bar').appear(function(){ var $this=$(this); var percent=$this.attr('data-width'); $this.animate({'width':percent + '%'},1500, 'easeOutCirc'); $this.find('strong').animate({'opacity':1},1000, 'easeOutCirc'); $this.find('strong').countTo({ from: 0, to: percent, speed: 1000, refreshInterval: 30, sign: '%' }); },{accX: 0, accY: -90}); $('#sliding-sidebar .to-progress-bar').each(function(index, element){ var $this=$(this); var percent=$this.attr('data-width'); $this.width(percent + '%'); $this.find('strong').css('opacity',1); $this.find('strong span').html(percent + '%'); }); } function pieChartAnim(){ $('.to-pie-chart-anim').appear(function(){ var percent=$(this).attr('data-anim'); $(this).data('easyPieChart').update(percent); },{accX: 0, accY: -90}); } function counter(){ $('.to-counter-holder').appear(function(){ var $this=$(this); var number=$this.attr('data-counter'); var speed=$this.attr('data-counter-speed'); if($this.closest('.no-touch .col.has-anim').length){ setTimeout(function(){ $this.find('.to-counter-number .to-count-number').countTo({ from: 0, to: number, speed: speed, refreshInterval: 30 }); }, 800); }else{ $this.find('.to-counter-number .to-count-number').countTo({ from: 0, to: number, speed: speed, refreshInterval: 30 }); }},{accX: 0, accY: -90}); } function lightOrDark(color){ var r,b,g,hsp, a=color; if(a===false){ a='#000000'; } if(a.match(/^rgb/)){ a=a.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/); r=a[1]; b=a[2]; g=a[3]; }else{ a=+("0x" + a.slice(1).replace(a.length < 5&&/./g, '$&$&')); r=a >> 16; b=a >> 8 & 255; g=a & 255; } hsp=Math.sqrt(0.299*(r*r)+0.587*(g*g)+0.114*(b*b)); if(hsp>200){ color='light'; }else{ color='dark'; } return color; } function buttonColor(){ $('.to-button.to-button-border.to-button-anim').each(function(index, element){ if(!$(this).attr('data-txtcolor')){ if($(this).parents('.parallax-container').length){ var txtColor=$(this).parents('.parallax-container').find('.parallax-container-overlay-color').css('background-color'); if(!txtColor){ var txtColor=$(this).parents('.parallax-container').find('.parallax-container-overlay').css('background-color'); }}else{ var txtColor=svgBg($(this)); } $(this).attr('data-txtcolor',txtColor); }else{ var txtColor=$(this).attr('data-txtcolor'); } var color1=lightOrDark($(this).attr('data-bgcolor')); var color2=lightOrDark(txtColor); if(color1==color2){ if(color2=='light'){ txtColor='#000000'; }else{ txtColor='#ffffff'; }} $(this).attr('data-txtcolor',txtColor); }); } $(document).on('mouseenter', '.to-button.to-button-border.to-button-anim', function(){ var txtColor=$(this).attr('data-txtcolor'); if(txtColor){ var bgColor=$(this).data('color'); $(this).attr('style', 'color:'+txtColor+';background:'+bgColor+' !important;border-color:'+bgColor+''); $(this).find('span').attr('style', 'color:'+txtColor); }}).on('mouseleave', '.to-button.to-button-border', function(){ var txtColor=$(this).data('color'); if(txtColor){ $(this).attr('style', 'color:'+txtColor+';background: none !important;border-color:'+txtColor+''); $(this).find('span').attr('style', 'color:'+txtColor); }}); $(document).on('mouseenter', '.to-button.to-button-bg.to-button-anim', function(){ var txtColor=$(this).data('color'); if(txtColor){ $(this).css('color', txtColor); $(this).find('span').attr('style', 'color:'+txtColor); }}).on('mouseleave', '.to-button.to-button-bg', function(){ var txtColor=$(this).data('bgcolor'); if(txtColor){ $(this).css('color', txtColor); $(this).find('span').attr('style', 'color:'+txtColor); }}); function iconHover(){ $('.to-icon').bind('webkitAnimationEnd mozAnimationEnd oAnimationEnd animationend', function(){ var anim=$(this).attr('data-anim-icon'); $(this).removeClass(anim); }); } $(document).on('hover', '.col, .to-list, .to-button', function(){ if($(this).find('ul').length===0&&$(this).find('.to-button').length===0){ var anim=$(this).find('.to-icon').attr('data-anim-icon'); $(this).find('.to-icon').addClass(anim); }}); $(document).on('hover', '.vc_column_container .to-icon', function(){ var anim=$(this).attr('data-anim-icon'); $(this).addClass(anim); }); $(document).on('mouseenter', '.col', function(){ var $this=$(this); if($this.find('.to-icon.full-bg.color.bg-anim').length > 0){ var color=$this.find('.to-icon.full-bg.color').attr('data-bg'); $this.find('.to-icon.full-bg.color.bg-anim').attr('style', 'color:'+ color +'! important'); $this.find('.to-icon.full-bg.color.bg-anim').css('background', 'none'); }}).on('mouseleave', '.col, .vc_column_container', function(){ var $this=$(this); if($this.find('.to-icon.full-bg.color.bg-anim').length > 0){ var color=$this.find('.to-icon.full-bg.color.bg-anim').attr('data-bg'); $this.find('.to-icon.full-bg.color.bg-anim').attr('style', 'color:'+ $this.find('.to-icon.full-bg.color').attr('data-color')); $this.find('.to-icon.full-bg.color.bg-anim').css('background', color); }}); $(document).on('mouseenter', '.vc_column_container .to-icon.full-bg.color.bg-anim', function(){ var $this=$(this); if($this.length > 0){ var color=$this.attr('data-bg'); $this.attr('style', 'color:'+ color +'! important'); $this.css('background', 'none'); }}).on('mouseleave', '.vc_column_container .to-icon.full-bg.color.bg-anim', function(){ var $this=$(this); if($this.length > 0){ var color=$this.attr('data-bg'); $this.attr('style', 'color:'+ $this.attr('data-color')); $this.css('background', color); }}); var tabholder='.to-tabs-holder', tab='.to-tabs li', tabLine='.to-tabs-line', activetab='active-tab'; $(document).on('click',tab, function(){ var $this=$(this); if(!$this.hasClass('active-tab')&&$this.index()>1){ var i=$this.index()-2; $this.closest(tabholder).find('.to-tab').hide().removeClass('active-tab'); $this.closest(tabholder).find('.to-tab').eq(i).fadeIn(500).addClass('active-tab'); $this.closest(tabholder).find('li').removeClass(activetab); $this.addClass(activetab); }}); $(document).on('mouseover',tab, function(){ if(!$(this).is('.to-tabs-overlay, .to-tabs-line')){ tabMove($(this)); }}).on('mouseleave',tab, function(){ if(!$(this).is('.to-tabs-overlay, .to-tabs-line')){ tabMove($(this).closest(tabholder).find('li.'+activetab)); }}); function activedtab(){ smartTabs(); $(tabholder).each(function(){ var $curtab=$(this).find('li.'+activetab); if(!$curtab.length){ $curtab=$(this).find('ul li').first(); $curtab.addClass(activetab); } tabMove($curtab); }); } function tabMove(el){ var index=el.position().left; var width=el.outerWidth(); movingLine(el.closest('ul').find(tabLine),width,index); } function movingLine(el,w,off){ if(Modernizr.csstransitions){ el.css({ 'width': w+'px', '-webkit-transform':' translate3d('+off+'px,0,0)', '-moz-transform':' translate3d('+off+'px,0,0)', '-ms-transform':' translate3d('+off+'px,0,0)', '-o-transform':' translate3d('+off+'px,0,0)', 'transform': 'translate3d('+off+'px,0,0)' }); }else{ el.stop(true).animate({left:off+'px',width:w+'px'}, 300); }} function smartTabs(){ $(tabholder).each(function(){ var width=0; $(this).find('.to-tabs li span').each(function(){ width=width + $(this).outerWidth(); }); if(width>$(this).width()){ $(this).addClass('block-tabs'); }else if($(this).hasClass('block-tabs')){ $(this).removeClass('block-tabs'); }}); } $(window).resize(function(){ smartTabs(); activedtab(); }); $(document).on('click', '.to-toggle-title', function(){ if($(this).find('.to-toggle-open .icon-to-plus').length){ $(this).find('.to-toggle-open').html(''); }else{ $(this).find('.to-toggle-open').html(''); } $(this).next('.to-toggle-content').slideToggle(200); }); var accContent='.to-accordion-content', accHolder='to-accordion-holder', accOpen='.to-accordion-open', accPlus='.to-accordion-open .icon-to-plus'; $(document).on('click', '.to-accordion-title', function(){ $this=$(this); $prev=$this.parent().prev(); while ($prev.hasClass(accHolder)){ if($prev.find(accContent).is(':visible')){ $prev.find(accContent).slideToggle(300); $prev.find(accOpen).html(''); } $prev=$prev.prev(); } $next=$this.parent().next(); while ($next.hasClass(accHolder)){ if($next.find(accContent).is(':visible')){ $next.find(accContent).slideToggle(300); $next.find(accOpen).html(''); } $next=$next.next(); } if($this.find(accPlus).length){ $this.next(accContent).slideToggle(300); $this.find(accOpen).html(''); }}); var pieChart, iconClass, speed; function initPieChart(){ $('.to-pie-chart').each(function(){ $pieChart=$(this); if($pieChart.hasClass('to-pie-chart-anim')){ speed=1000; }else{ speed=1; } var legendStyle=$pieChart.attr('data-legend-style'); var lineWidth=$pieChart.attr('data-line-width'); var barColor=$pieChart.attr('data-bar-color'); var backgroundColor=$pieChart.attr('data-background-color'); var chartSize=$pieChart.width(); $pieChart.easyPieChart({ animate: speed, barColor: barColor, trackColor: backgroundColor, lineWidth: lineWidth, size: chartSize, scaleColor: false, onStep: function(from, to, percent){ if(legendStyle=='percent'){ this.el.children[0].innerHTML=Math.round(percent)+'%'; }} }); pieChartSize(); }); } function pieChartSize(){ var maxSize=$pieChart.parent().parent().width()*0.9; var maxWidth=parseInt($pieChart.parent().css('max-width')); var pieWidth=parseInt($pieChart.data('width')); if(pieWidth > maxSize||maxWidth < maxSize){ if(pieWidth <=maxSize){ maxSize=pieWidth; } $pieChart.parent().css({'max-width': maxSize+'px','max-height': maxSize+'px','line-height': maxSize+'px'}); $pieChart.find('canvas').width(maxSize).height(maxSize); pieWidth=maxSize; } $pieChart.find('span').css('font-size', (pieWidth/5)+'px'); $pieChart.find('i').css('font-size', (pieWidth/3)+'px'); } $(window).resize(function(){ $('.to-pie-chart').each(function(){ $pieChart=$(this); pieChartSize(); }); }); function teamCarousel(){ $('.to-team-carousel').owlCarousel({ theme: '', pagination: false, navigation: true, slideSpeed: 500, navigationText: ['',''] }); } function testiCarousel(){ $('.to-testimonial').owlCarousel({ theme: '', singleItem: true, autoHeight: true, stopOnHover: true, slideSpeed: 500, navigationText: ['',''] }); } function clientCarousel(){ $('.to-clients-carousel').owlCarousel({ theme: '', stopOnHover: true, slideSpeed: 500, navigationText: ['',''], }); } function toscSlider(){ $('.to-sc-slider').owlCarousel({ theme: '', singleItem: true, autoHeight: true, stopOnHover: true, slideSpeed: 500, navigationText: ['
','
'] }); } function toscTwitter(){ $('.to-sc-twitter').owlCarousel({ theme: '', singleItem: true, autoHeight: true, stopOnHover: true, slideSpeed: 500, navigationText: ['',''] }); } function svgBg(svgEl){ var color=svgEl.css('background-color'); if((color!=='rgba(0, 0, 0, 0)')&&(color!=='transparent')){ return color; } if(svgEl.is('body')){ return false; }else{ return svgBg(svgEl.parent()); }} function svgFill(){ $('.to-separator-top svg path, .to-separator-bottom svg path, .to-separator-top svg circle, .to-separator-bottom svg circle').each(function(){ var fill=$(this).attr('fill'); if(typeof val==='undefined'){ var fillColor=svgBg($(this)); $(this).css('fill', fillColor); }}); } var videosSection=[]; var videoSDiv='.parallax-container video'; var videoVimeoS='iframe.vimeo-player-section'; function videoSection(){ videosSection=[]; $(videoSDiv).mediaelementplayer({ features: ['volume'], pauseOtherPlayers: false, loop: true, startVolume: 0.0, success: function(mediaElement, domObject){ mediaElement.addEventListener('play', function(e){ $(mediaElement).closest('.parallax-container').find('.parallax-container-poster').remove(); }); videosSection.push(mediaElement); mediaElement.pause(); mediaElement.load(); mediaElement.addEventListener('loadeddata', function(e){ videoSectionSize(mediaElement); mediaElement.play(); }); }, error: function(domObject){ $(domObject).closest('.mejs-container').remove(); }}); } function videoSectionSize(mediaElement){ var $this=$(mediaElement); $this.attr('style',''); var wW=$this.width(); var wH=$this.height(); var pW=$this.closest('.parallax-container-inner').width(); var pH=$this.closest('.parallax-container-inner').height(); var wR=wW/pW; var hR=wH/pH; var scale=Math.min(wR,hR); var rW=(wW/scale); var rH=(wH/scale); var leftI=-Math.abs((rW-pW)/2); var topI=(rH-rW)/2; $this.attr('style', 'height: auto !important; width: '+rW+'px !important; left: '+leftI+'px !important; top: 0px !important;'); } function videoSectionVimeo(){ $('iframe.vimeo-player-section').each(function(){ var $el=$(this); var pYTW=$el.parent().width(); var pYTH=$el.parent().height(); var ratio; if(!$el.data('vimeo-ratio')){ ratio=$el.data('height') / $el.data('width'); $el.attr('data-vimeo-ratio', ratio); }else{ ratio=$el.attr('data-vimeo-ratio'); } $el.removeAttr('height width'); if(pYTW*ratio >=pYTH){ $el.height(pYTW*ratio).width('100%').css('margin-top', -(pYTW*ratio-pYTH)/2).css('margin-left', 0); }else{ var left=-(pYTH/ratio-pYTW)/2; $el.height(pYTH).width(pYTH/ratio).css('margin-left', left).css('margin-top', 0); }}); $.getScript('//a.vimeocdn.com/js/froogaloop2.min.js', function(){ $('iframe.vimeo-player-section').each(function(){ var $this=$(this); $this.attr('src', $this.attr('src')); var player=$f(this); player.addEvent('ready', function(){ player.api('setVolume', 0); player.api('play'); }); }); }); $(window).on('statechangecomplete', function(){ $('iframe.vimeo-player-section').each(function(){ var player=$f(this); player.addEvent('ready', function(){ player.api('setVolume', 0); player.api('play'); }); }); }); } $(window).resize(function(){ $(videoSDiv).each(function(){ videoSectionSize($(this)); }); videoSectionVimeo(); }); var toSCvideo='.to-sc-video-holder video'; function to_sc_video(){ $(toSCvideo).mediaelementplayer({ features: ['fullscreen','playpause', 'current', 'progress', 'duration', 'volume'], videoVolume: 'vertical', pauseOtherPlayers: false, startVolume: 0.8, success: function(mediaElement, domObject){ mediaElement.addEventListener("ended", function(e){ $(e.target).closest('.to-sc-video-holder').find(' .mejs-poster').show(); }); }, error: function(domObject){ $(domObject).closest('.mejs-container').remove(); }}); } var fontArr=[]; function google_font_loader(){ $('span[data-font]').each(function(){ var font=$(this).data('font'); var family=font.replace(':',''); if($.inArray(family, fontArr)==-1){ fontArr.push(family); $.ajax({ beforeSend: function(xhr){ xhr.overrideMimeType("application/octet-stream"); }, success: function(){ $("", { 'id': family, 'rel': 'stylesheet', 'href': 'http://fonts.googleapis.com/css?family='+font }).appendTo('head'); }}); }}); } function processStep(){ var owlClick=false; var owlDrag=false; $('.to-process').owlCarousel({ theme: '', pagination: false, navigation: false, slideSpeed: 500, afterInit: function(elem){ var page=''; var nb=$(elem).find('.owl-item').length; var first=' active'; if(nb > 1){ for (var i=1; i<=nb; i++){ page=page+''+((i<10) ? 0+String(i):String(i))+''; first=''; } $(elem).append(''+page+''); } $(elem).find('.owl-item').first().addClass('active'); }, startDragging:function (elem){ owlDrag=true; }, afterMove:function (elem){ if(owlClick!==true){ var $current=$(elem).closest('.to-process'); var x=this.owl.currentItem; $current.find('.to-step-nb').add($current.find('.owl-item')).removeClass('active'); $current.find('.to-step-nb').eq(x).add($current.find('.owl-item').eq(x)).addClass('active'); } owlClick=false; owlDrag=false; }}); $(document).on('click', '.to-process .to-step-nb', function(e){ owlClick=true; var $current=$(this).closest('.to-process'); var owl=$current.data('owlCarousel'); var x=parseInt($(this).text())-1; $current.find('.to-step-nb').add($current.find('.owl-item')).removeClass('active'); $(this).add($current.find('.owl-item').eq(x)).addClass('active'); owl.goTo(x); }); $(document).on('click', '.to-process .owl-item', function(e){ owlClick=true; var $current=$(this).closest('.to-process'); var owl=$current.data('owlCarousel'); var x=parseInt($(this).index()); $current.find('.to-step-nb').add($current.find('.owl-item')).removeClass('active'); $(this).add($current.find('.to-step-nb').eq(x)).addClass('active'); owl.goTo(x); }); } var chrW=0; $.browser.chrome=/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()); if($.browser.chrome){ chrW=2; } $(document).ready(function(){ if($('#wpadminbar').length){ adminBarH=parseInt($('html').css('top')); }else{ adminBarH=0; }}); $(window).resize(function(){ if($('#wpadminbar').length){ adminBarH=parseInt($('html').css('top')); }else{ adminBarH=0; }}); var targets='[rel~=tooltip]', target=false, tooltip=false, title=false, pos_left, pos_top; function to_tooltip_size(){ var docW=$(window).width(); if(docW < 340 * 1.5){ tooltip.css('width',docW/2); }else{ tooltip.css('width',340); } pos_left=target.offset().left - (tooltip.outerWidth()/2) + 15 - chrW; pos_top=target.offset().top - tooltip.outerHeight(); if(pos_left < 0){ pos_left=target.offset().left + target.outerWidth() / 2; tooltip.addClass('left'); }else{ tooltip.removeClass('left'); } if(pos_left + tooltip.outerWidth() > docW){ pos_left=target.offset().left - tooltip.outerWidth() + target.outerWidth() / 2; tooltip.addClass('right'); }else{ tooltip.removeClass('right'); } if(pos_top - $(window).scrollTop() - $('header').height() - 45 < 0){ pos_top=target.offset().top + target.outerHeight(); tooltip.addClass('top'); pos_top=pos_top + 25 - adminBarH; }else{ tooltip.removeClass('top'); pos_top=pos_top - 25 - adminBarH; } chrW=10; } $(document).on('mouseenter', targets, function(){ tip=$(this).data('content'); target=$(this).closest('.to-pulse-holder'); tooltip=$('#to-tooltip'); if(!tip||tip==''){ return false; } if(tooltip.length==0){ $('body').append('
'); tooltip=$('#to-tooltip'); } tooltip.css('z-index', 10); tooltip.html(tip); to_tooltip_size(); tooltip.css({left: pos_left,top: pos_top}).addClass('show'); }).on('mouseleave', targets, function(){ remove_tooltip(); }); function remove_tooltip(){ tooltip.removeClass('show'); setTimeout(function(){ if(tooltip.css('opacity')==0){ tooltip.css('z-index', -1); }},500); } $(window).resize(function(){ if(tooltip.length==0){ to_tooltip_size(); tooltip.css('z-index', -1); }}); function typeString($target, str, cursor, delay, cb){ $target.html(function (_, html){ return html + str[cursor]; }); if(cursor < str.length - 1){ delay=Math.round(Math.random() * (300 - 30)) + 30; setTimeout(function (){ typeString($target, str, cursor + 1, delay, cb); }, delay); }else{ cb(); }} function deleteString($target, delay, cb){ var length; $target.html(function (_, html){ length=$target.text().length; return html.substr(0, length - 1); }); delay=100; if(length > 1){ setTimeout(function (){ deleteString($target, delay, cb); }, delay); }else{ cb(); }} $.fn.extend({ teletype: function (opts){ var settings=$.extend({}, $.teletype.defaults, opts); return $(this).each(function (){ (function loop($tar, idx){ typeString($tar, settings.text[idx], 0, settings.delay, function (){ setTimeout(function (){ deleteString($tar, settings.delay, function (){ loop($tar, (idx + 1) % settings.text.length); }); }, settings.pause); }); }($(this), 0)); }); }}); $.extend({ teletype: { defaults: { delay: 100, pause: 2500, text: [] }} }); function typeWriter (){ $('.to-type-writer').each(function(){ var $this=$(this); if(!$this.hasClass('typing')){ $this.teletype({ text:$this.data('text').split(";"), pause: $this.data('pause') }); $this.addClass('typing'); }}); $('.to-type-writer-cursor').teletype({ text: ['|', ' '], delay: 0, pause: 500 }); } function initShortcode(){ processStep(); google_font_loader(); buttonColor(); colCalc(); activedtab(); smartTabs(); iconHover(); initPieChart(); pieChartAnim(); progressBar(); counter(); teamCarousel(); testiCarousel(); clientCarousel(); toscSlider(); toscTwitter(); svgFill(); to_sc_video(); videoSection(); videoSectionVimeo(); colCalc2(); typeWriter(); } colAnim(); $(document).ready(function(){ initShortcode(); }); $(window).on('statechangecomplete', function(){ colAnim(); initShortcode(); ajaxVCscripts(); }); function ajaxVCscripts(){ if($('html').hasClass('vc_desktop')){ vc_toggleBehaviour(); vc_tabsBehaviour(); vc_accordionBehaviour(); vc_teaserGrid(); vc_carouselBehaviour(); vc_slidersBehaviour(); vc_prettyPhoto(); vc_googleplus(); vc_pinterest(); vc_progress_bar(); vc_plugin_flexslider(); vc_google_fonts(); vc_gridBehaviour(); vc_rowBehaviour(); jQuery(document).trigger('vc_js'); window.setTimeout(vc_waypoints, 500); }} var isInIframe=(window.location!=window.parent.location) ? true:false; if(isInIframe===true){ $(window).resize(function(e){ google_font_loader(); buttonColor(); colCalc(); activedtab(); smartTabs(); iconHover(); initPieChart(); pieChartAnim(); progressBar(); counter(); svgFill(); to_sc_video(); videoSection(); videoSectionVimeo(); colCalc2(); typeWriter(); }); }}); jQuery(document).ready(function ($){ $(document).on('click', '.post-like', function(e){ e.preventDefault(); $heart=$(this); post_id=$heart.data('post_id'); $heart.find('.fa-heart-o, .fa-heart').addClass('heart-pulse'); $.ajax({ type: "post", url: ajax_var.url, data: 'action=post-like&nonce='+ajax_var.nonce+'&post_like=&post_id='+post_id, success: function(count){ if(count.indexOf('already')!==-1){ var lecount=count.replace('already',''); var heartClass='no-liked'; $heart.prop('title', 'Like'); $heart.removeClass('liked'); if(lecount==0){ var lecount='0'; $heart.html(' '+lecount+''); }else{ $heart.html(' '+lecount+''); }}else{ var heartClass='liked'; $heart.prop('title', 'Unlike'); $heart.addClass('liked'); $heart.html(' '+count+''); } $heart.removeClass('liked no-liked').addClass(heartClass) $heart.children('.like i').removeClass('heart-pulse'); }}); return false; }) }); (function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(typeof window.FormData!=='function'){ return; } wpcf7.submit($form); event.preventDefault(); }); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val(''); }); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); $('[name="g-recaptcha-response"]', $form).each(function(){ if(''===$(this).val()){ var $recaptcha=$(this).closest('.wpcf7-form-control-wrap'); wpcf7.notValidTip($recaptcha, wpcf7.recaptcha.messages.empty); }}); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); } $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$(''); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); function vc_js(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_googleplus(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_google_fonts(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}function getSizeName(){var screen_w=jQuery(window).width();return 1170screen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('
    ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width(),perspective=4*width+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=frontHeight>backHeight?frontHeight:backHeight;hoverBoxHeight<250&&(hoverBoxHeight=250),hoverBoxInner.css("min-height",hoverBoxHeight+"px")})}function vc_prepareHoverBox(){var hoverBox=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(hoverBox),vc_setHoverBoxPerspective(hoverBox)}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('
    ')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("
    ").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(vc_prepareHoverBox),jQuery(window).resize(vc_prepareHoverBox),jQuery(document).ready(function($){window.vc_js()}); jQuery(function(e){if("undefined"==typeof wc_single_product_params)return!1;e("body").on("init",".wc-tabs-wrapper, .woocommerce-tabs",function(){e(".wc-tab, .woocommerce-tabs .panel:not(.panel .panel)").hide();var t=window.location.hash,i=window.location.href,o=e(this).find(".wc-tabs, ul.tabs").first();t.toLowerCase().indexOf("comment-")>=0||"#reviews"===t||"#tab-reviews"===t?o.find("li.reviews_tab a").click():i.indexOf("comment-page-")>0||i.indexOf("cpage=")>0?o.find("li.reviews_tab a").click():"#tab-additional_information"===t?o.find("li.additional_information_tab a").click():o.find("li:first a").click()}).on("click",".wc-tabs li a, ul.tabs li a",function(t){t.preventDefault();var i=e(this),o=i.closest(".wc-tabs-wrapper, .woocommerce-tabs");o.find(".wc-tabs, ul.tabs").find("li").removeClass("active"),o.find(".wc-tab, .panel:not(.panel .panel)").hide(),i.closest("li").addClass("active"),o.find(i.attr("href")).show()}).on("click","a.woocommerce-review-link",function(){return e(".reviews_tab a").click(),!0}).on("init","#rating",function(){e("#rating").hide().before('

    12345

    ')}).on("click","#respond p.stars a",function(){var t=e(this),i=e(this).closest("#respond").find("#rating"),o=e(this).closest(".stars");return i.val(t.text()),t.siblings("a").removeClass("active"),t.addClass("active"),o.addClass("selected"),!1}).on("click","#respond #submit",function(){var t=e(this).closest("#respond").find("#rating"),i=t.val();if(t.length>0&&!i&&"yes"===wc_single_product_params.review_rating_required)return window.alert(wc_single_product_params.i18n_required_rating_text),!1}),e(".wc-tabs-wrapper, .woocommerce-tabs, #rating").trigger("init");var t=function(t,i){this.$target=t,this.$images=e(".woocommerce-product-gallery__image",t),0!==this.$images.length?(t.data("product_gallery",this),this.flexslider_enabled=e.isFunction(e.fn.flexslider)&&wc_single_product_params.flexslider_enabled,this.zoom_enabled=e.isFunction(e.fn.zoom)&&wc_single_product_params.zoom_enabled,this.photoswipe_enabled="undefined"!=typeof PhotoSwipe&&wc_single_product_params.photoswipe_enabled,i&&(this.flexslider_enabled=!1!==i.flexslider_enabled&&this.flexslider_enabled,this.zoom_enabled=!1!==i.zoom_enabled&&this.zoom_enabled,this.photoswipe_enabled=!1!==i.photoswipe_enabled&&this.photoswipe_enabled),1===this.$images.length&&(this.flexslider_enabled=!1),this.initFlexslider=this.initFlexslider.bind(this),this.initZoom=this.initZoom.bind(this),this.initZoomForTarget=this.initZoomForTarget.bind(this),this.initPhotoswipe=this.initPhotoswipe.bind(this),this.onResetSlidePosition=this.onResetSlidePosition.bind(this),this.getGalleryItems=this.getGalleryItems.bind(this),this.openPhotoswipe=this.openPhotoswipe.bind(this),this.flexslider_enabled?(this.initFlexslider(),t.on("woocommerce_gallery_reset_slide_position",this.onResetSlidePosition)):this.$target.css("opacity",1),this.zoom_enabled&&(this.initZoom(),t.on("woocommerce_gallery_init_zoom",this.initZoom)),this.photoswipe_enabled&&this.initPhotoswipe()):this.$target.css("opacity",1)};t.prototype.initFlexslider=function(){var t=this.$target,i=this,o=e.extend({selector:".woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image",start:function(){t.css("opacity",1)},after:function(e){i.initZoomForTarget(i.$images.eq(e.currentSlide))}},wc_single_product_params.flexslider);t.flexslider(o),e(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").one("load",function(){var t=e(this);t&&setTimeout(function(){var e=t.closest(".woocommerce-product-gallery__image").height(),i=t.closest(".flex-viewport");e&&i&&i.height(e)},100)}).each(function(){this.complete&&e(this).trigger("load")})},t.prototype.initZoom=function(){this.initZoomForTarget(this.$images.first())},t.prototype.initZoomForTarget=function(t){if(!this.zoom_enabled)return!1;var i=this.$target.width(),o=!1;if(e(t).each(function(t,a){if(e(a).find("img").data("large_image_width")>i)return o=!0,!1}),o){var a=e.extend({touch:!1},wc_single_product_params.zoom_options);"ontouchstart"in window&&(a.on="click"),t.trigger("zoom.destroy"),t.zoom(a)}},t.prototype.initPhotoswipe=function(){this.zoom_enabled&&this.$images.length>0&&(this.$target.prepend('🔍'),this.$target.on("click",".woocommerce-product-gallery__trigger",this.openPhotoswipe)),this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)},t.prototype.onResetSlidePosition=function(){this.$target.flexslider(0)},t.prototype.getGalleryItems=function(){var t=this.$images,i=[];return t.length>0&&t.each(function(t,o){var a=e(o).find("img"),s={src:a.attr("data-large_image"),w:a.attr("data-large_image_width"),h:a.attr("data-large_image_height"),title:a.attr("data-caption")?a.attr("data-caption"):a.attr("title")};i.push(s)}),i},t.prototype.openPhotoswipe=function(t){t.preventDefault();var i,o=e(".pswp")[0],a=this.getGalleryItems(),s=e(t.target);i=s.is(".woocommerce-product-gallery__trigger")||s.is(".woocommerce-product-gallery__trigger img")?this.$target.find(".flex-active-slide"):s.closest(".woocommerce-product-gallery__image");var r=e.extend({index:e(i).index()},wc_single_product_params.photoswipe_options);new PhotoSwipe(o,PhotoSwipeUI_Default,a,r).init()},e.fn.wc_product_gallery=function(e){return new t(this,e),this},e(".woocommerce-product-gallery").each(function(){e(this).wc_product_gallery()})}); !function(){"use strict";function e(e){function t(t,n){var s,h,k=t==window,y=n&&n.message!==undefined?n.message:undefined;if(!(n=e.extend({},e.blockUI.defaults,n||{})).ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=y===undefined?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&"string"!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,g={};e(t).data("blockUI.history",g),g.el=m,g.parent=m.parentNode,g.display=m.style.display,g.position=m.style.position,g.parent&&g.parent.removeChild(m)}e(t).data("blockUI.onUnblock",n.onUnblock);var v,I,w,U,x=n.baseZ;v=e(r||n.forceIframe?'':''),I=e(n.theme?'':''),n.theme&&k?(U='"):n.theme?(U='"):U=k?'':'',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&v.css("opacity",0);var C=[v,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=a(t,"borderTopWidth"),T=a(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';o.setExpression("top",i)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&v.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):d(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,d=e(t),a=d.data("blockUI.history"),c=d.data("blockUI.timeout");c&&(clearTimeout(c),d.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var r;r=l?e(document.body).children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0==--s&&n(r,a,o,t)})):n(r,a,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(d,n,s):e(document).unbind(d,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,d=e(t.target);return d.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),d.parents("div."+s.blockMsgClass).length>0||0===d.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[!0===e?b.length-1:0];t&&t.focus()}}function d(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-a(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-a(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function a(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('
    ');t&&s.append("

    "+t+"

    "),o&&s.append("

    "+o+"

    "),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"

    Please wait...

    ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u=0&&parseFloat(o(this).val())0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()})}); var touchDevice=(Modernizr.touch) ? true:false; var ie=(function(){var v=3,div=document.createElement('div'),all=div.getElementsByTagName('i');do{div.innerHTML=''}while(all[0]);return v>4?v:document.documentMode}());if((!ie||ie>8)&&touchDevice===false){ function init(){if(document.body){var a=document.body,b=document.documentElement,c=window.innerHeight,d=a.scrollHeight;if(root=0<=document.compatMode.indexOf("CSS")?b:a,activeElement=a,initdone=!0,top!=self)frame=!0;else if(d>c&&(a.offsetHeight<=c||b.offsetHeight<=c)){var e=!1,d=function(){e||b.scrollHeight==document.height||(e=!0,setTimeout(function(){b.style.height=document.height+"px",e=!1},500))};b.style.height="auto",setTimeout(d,10),addEvent("DOMNodeInserted",d),addEvent("DOMNodeRemoved",d),root.offsetHeight<=c&&(c=document.createElement("div"),c.style.clear="both",a.appendChild(c))}-1